package com.tao.design.strategy.demo2;


import org.springframework.stereotype.Component;

@Component
public class AlipayPayment implements Payment {

    @Override
    public PaymentEnum getPayType() {
        return PaymentEnum.Ali;
    }

    @Override
    public PayResult pay(Order2 order) {
//        调用支付宝支付
        if (false) {
            return PayResult.SUCCESS;
        } else {
            return PayResult.FAIL;
        }
    }

}
